/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.streamsets.pipeline.stage.destination.hbase;

import com.streamsets.pipeline.api.ErrorCode;
import com.streamsets.pipeline.api.GenerateResourceBundle;

@GenerateResourceBundle
public enum Errors implements ErrorCode {
  HBASE_00("Hadoop UserGroupInformation reports Simple authentication, it should be Kerberos"),
  HBASE_01("Failed to configure or connect to the '{}' Hbase: {}"),
  HBASE_02("Error while writing batch of records to hbase"),
  HBASE_04("Zookeeper quorum cannot be empty"),
  HBASE_05("Table name cannot be empty "),
  HBASE_06("Cannot connect to cluster: {}"),
  HBASE_07("Table name doesn't exist: {}"),
  HBASE_08("Table is not enabled: {}"),
  HBASE_09("Zookeeper root znode cannot be empty "),
  HBASE_10("Failed writing record '{}': {}"),
  HBASE_11("Cannot parse family and qualifier for record: {} and rowkey: {}"),
  HBASE_12("Cannot convert type: {} to {} for record: {} "),
  HBASE_13("Zookeeper client port is invalid: {}"),
  HBASE_14("Invalid row key storage type: {}"),
  HBASE_15("Invalid column storage type: {}"),
  HBASE_16("Hadoop UserGroupInformation should return kerberos authentication, it is set to: {}"),
  HBASE_17("Failed to configure or connect to the HBase cluster: {}"),
  HBASE_18("HBase column mapping is undefined. There should be atleast one column"),
  HBASE_19("HBase configuration directory '{}' under SDC resources does not exist"),
  HBASE_20("HBase configuration directory '{}' path under  SDC resources is not a directory"),
  HBASE_21("HBase configuration file '{}/{}' under SDC resources is not a file"),
  HBASE_22("Could not resolve the default Kerberos realm, you must set the 'hbase.master.kerberos.principal' " +
    "property to the HBase master principal name: {}"),
  HBASE_23("Could not resolve the default Kerberos realm, you must set the 'hbase.regionserver.kerberos.principal' " +
    "property to the HBase Regionserver principal name: {}"),
  HBASE_24("HBase Configuration Directory '{}' must be relative to SDC resources directory in cluster mode"),
  HBASE_25("Missing column field '{}' in record"),
  HBASE_26("Errors while writing to HBase: '{}'"),
  HBASE_27("Missing row key field '{}' in record")
  ;
  private final String msg;

  Errors(String msg) {
    this.msg = msg;
  }

  @Override
  public String getCode() {
    return name();
  }

  @Override
  public String getMessage() {
    return msg;
  }
}
